package com.caesar.Set;

import java.util.Comparator;

/**
 * @author caesar
 * @date 2025/7/16
 * @Description:
 * @apiNote
 */
public class EmployeeAgeComparator implements Comparator<Employee> {
    @Override
    public int compare(Employee o1, Employee o2) {
        int result = Integer.compare(o1.getAge(),o2.getAge());

        return result != 0 ? result : Integer.compare(o1.getId(),o2.getId());
    }
}
